package com.igeek.javase.ch02;

import java.util.Scanner;

/*
 *@author wangpeng
 *2023/7/11 15:59
 *@description TODO
 */
public class IfTest2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入订票日期(输入格式举例：6.09 表示6月9日)：");
        double date = sc.nextDouble();
        System.out.println("请输入票价(自己设定)：");
        double price = sc.nextDouble();

        if ((date >= 1.01 && date <= 1.03) || (date >= 5.01 && date <= 5.03) || (date >= 10.01 && date <= 10.07)) {
            System.out.println("票价为：" + price + "元");
        } else {
            System.out.println("票价为：" + 0.8 * price + "元");
        }
    }
}


